package io.mft.commons.function.predictate;

import io.mft.commons.function.ExecuteReturnPredictate;
import io.mft.commons.function.response.FunctionResponse;

public class NotEmptyDsResponseOkToFailPredictate implements ExecuteReturnPredictate {

	private FunctionResponse response;
	public NotEmptyDsResponseOkToFailPredictate(FunctionResponse response) {
		this.response=response;
	}
	@Override
	public boolean predicate() {
		if (response.getErrorNo()==0&&response.list().size()>0) {
			return false;
		}else {
			boolean s=response.getErrorNo()==0?true:false;
			return s;
		}
		
		
	}

}
